#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2024-05-17 15:12
# @Author  : nedncs
# @File    : run.py
# @Description : src/python_ldap_admin/utils
import logging


def getLevel(log_level: str):
    # 文本转日志类型
    if log_level.lower() == "info":
        return logging.DEBUG
    elif log_level.lower() == "error":
        return logging.ERROR
    elif log_level.lower() == "warning":
        return logging.WARNING
    elif log_level.lower() == "debug":
        return logging.DEBUG
    else:
        return logging.INFO